package com.huangfu.learning.javabase.web.service.impl;

import com.huangfu.learning.javabase.web.dao.UserDao;
import com.huangfu.learning.javabase.web.entity.User;
import com.huangfu.learning.javabase.web.service.UserService;
import com.huangfu.learning.javabase.web.dao.UserDao;
import com.huangfu.learning.javabase.web.entity.User;
import com.huangfu.learning.javabase.web.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 * Author: huangfu.daohui
 * Date: 2018/8/18
 * Time: 14:24
 * Version: 1.0
 * Description:
 **/
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDao userDao;

    @Override
    public User login(User user) {
        return userDao.login(user);
    }

    @Override
    public User getUserById(String id) {
        return userDao.selectByPrimaryKey(Integer.parseInt(id));
    }


    @Override
    public void add(User user) {

    }

    @Override
    public void update(User user) {

    }
}
